Four people were killed and 14 injured as a gunman in a uniform went on rampage at the United States military base in Fort Hood, Texas.